From 6eaa964d3ebf1f8d32737d1291ac1cd1749a51d5 Mon Sep 17 00:00:00 2001 From: "Felix S. Klock II" Date: Fri, 16 Jun 2017 17:54:44 +0200 Subject: [PATCH] Fix #4135: if theres `include = [...]`, then dont prepopulate filelist via git --- src/cargo/sources/path.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/cargo/sources/path.rs b/src/cargo/sources/path.rs index cb9c2dde0..7a21713f4 100644 --- a/src/cargo/sources/path.rs +++ b/src/cargo/sources/path.rs @@ -114,8 +114,11 @@ impl<'cfg> PathSource<'cfg> { } }; - if let Some(result) = self.discover_git_and_list_files(pkg, root, &mut filter) { - return result; + // attempt git-prepopulate only if no `include` (rust-lang/cargo#4135) + if include.is_empty() { + if let Some(result) = self.discover_git_and_list_files(pkg, root, &mut filter) { + return result; + } } self.list_files_walk(pkg, &mut filter) -- 2.30.2